<?php 
    $tmp =new XTemplate('sites/views/hocsinh/listall.html');
    $sql = "SELECT hocsinh.* FROM hocsinh";
    $arr = $db->GetArray($sql);
    //print_r($arr);
    foreach($arr as $val){
        $val['ngaysinh'] = date('d/m/Y',strtotime($val['ngaysinh']));
        $tmp->insert_loop('HS.LS',array('LS'=>$val));
    }
    $tmp->parse('HS');
    $maincontent = $tmp->text('HS');
?>